﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../MasterPage.Master"
CodeBehind="wfPrograVacaBnd.aspx.cs" Inherits="RH.wfPrograVacaBnd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
 <script type="text/javascript">
     window.onload = function () {
         this.ResizeGrid();
         this.MessageOnPostback();
     }

     function ResizeGrid() {
         internalGridResize("<%= grdList.ClientID %>");
     }

     function SelectedCheckBoxAll(ckb) {
        var gv = document.getElementById("<%=grdList.ClientID%>");
        var rbs = gv.getElementsByTagName("input");
        for (var i = 0; i < rbs.length; i++) {
           if (rbs[i].type == "checkbox") {
              rbs[i].checked = ckb.checked;
           }
        }
     }

     function panelOnUpdating() {
         updatePanelAnimationUpdating();
     }

     function panelOnUpdated() {
         ResizeGrid();
         updatePanelAnimationUpdated();
     }
 </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class="ToolBar">
   <asp:Menu ID="mnuToolbar" runat="server" Orientation="Horizontal" CssClass="ToolBarControl"
      OnMenuItemClick="mnuToolbar_MenuItemClick">
      <Items>
            <asp:MenuItem Text="  Programacion Grupal" Value="_BTTNEW" ImageUrl="../Images/Icons/Enabled/CalendarGroup.png">
            </asp:MenuItem>
            <asp:MenuItem Text="  Vista Previa" Value="_BTTPRN" ImageUrl="../Images/Icons/Enabled/Preview.png">
            </asp:MenuItem>
            <asp:MenuItem Text="  Exportar" Value="_BTTEXPO" ImageUrl="../Images/Icons/Enabled/ExportXLS.png">
            </asp:MenuItem>
      </Items>
   </asp:Menu>
</div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    <div class="DataHeader">
         <table id="TableDataHeader" cellpadding="0" cellspacing="0">
            <tr><td colspan="11" >&nbsp;</td></tr>
            <tr>
               <td style=" width:10px;" >             
                  &nbsp;
               </td>
               <td>
                 Codigo
               </td>
               <td>
                 <esd:esdMaskedTextBox runat="server" ID="txtidPersonal" width="150px" Mask="?9999999">
                 </esd:esdMaskedTextBox> 
               </td>
               <td>
                 Doc. Identidad
               </td>
               <td>
                 <esd:esdTextBox runat="server" ID="txtnuDocIden" width="150px">
                 </esd:esdTextBox> 
               </td>
               <td>
                 Ap. y Nombres
               </td>
               <td>
                 <esd:esdTextBox runat="server" ID="txtdsPersonal" Width="350px"></esd:esdTextBox> 
               </td>
               <td>
                  &nbsp;
               </td>
               <td>
                  &nbsp;
               </td>
               <td>
                   <esd:esdButton ID="bttClear" runat="server" Text="Limpiar" Width="80px">
                   </esd:esdButton> 
               </td>
               <td style=" width:10px;" >
                  &nbsp;
               </td>
            </tr>
            <tr>
               <td style=" width:10px;" >             
                  &nbsp;
               </td>
               <td>
                  Planilla
               </td>
               <td>
                  <asp:DropDownList ID="ddlidPlanilla" runat="server" Width="150px"></asp:DropDownList>
               </td>
               <td>
                  Establecimiento
               </td>
               <td>
                  <asp:DropDownList ID="ddlidEstable" runat="server" Width="150px"></asp:DropDownList>
               </td>
               <td>
                  Unidad Negocio
               </td>
               <td>
                  <asp:DropDownList ID="ddlidUniNego" runat="server" Width="150px" AutoPostBack="true" OnSelectedIndexChanged="ddlidUNegocio_SelectedIndexChanged"></asp:DropDownList>
               </td>
               <td>
                  &nbsp;
               </td>
               <td>
                  &nbsp;
               </td>
               <td style=" width:10px;" >
                  &nbsp;
               </td>
            </tr>
             <tr>
               <td style=" width:10px;" >             
                  &nbsp;
               </td>
               <td style=" width:90px;" >
                  Centro de Costo
               </td>
               <td>
                  <asp:DropDownList ID="ddlidCCosto" runat="server" Width="150px"></asp:DropDownList>
               </td>
               <td>
                  Forma de Pago
               </td>
               <td>
                  <asp:DropDownList ID="ddlidFormaPago" runat="server" Width="150px"></asp:DropDownList>
               </td>
               <td>
                  Mes Ini. Vac.
               </td>
               <td colspan="3">
                  <asp:DropDownList ID="ddlidmes" runat="server" Width="150px"></asp:DropDownList>
               </td>
               <td>
                   <esd:esdButton ID="bttSearch" Runat="server" Text="Buscar" Width="80px" OnClick="bttOk_Click">
                   </esd:esdButton>
                </td>
               <td style=" width:10px;" >
                  &nbsp;
               </td>
            </tr>
            <tr><td colspan="11" >&nbsp;</td></tr>
         </table>
    </div>
    <div class="DataDetail">
        <esd:esdGridView CssClass="esdGridView" ID="grdList" runat="server" ScrollWidth="100%"
            Width="100%" ShowHeaderWhenEmpty="True" AutoGenerateColumns="False" 
            DataKeyNames="RowNumber" OnRowCommand="grdList_RowCommand" OnRowDataBound="grdList_RowDataBound">
            <Columns>
            <asp:TemplateField HeaderText="Sel.">
               <ItemTemplate>
                  <asp:CheckBox ID="chkSelected" runat="server" Checked="false" />
               </ItemTemplate>
               <HeaderStyle Width="22px" />
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:ImageButton ID="grdBttCmdEdit" CommandName="CmdEdit" CommandArgument="<%# Container.DataItemIndex %>"
                        runat="server" ImageUrl="../Images/Icons/Enabled/CalendarOne.png" ToolTip="Programacion Individual" />
                </ItemTemplate>
                <HeaderStyle Width="22px" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:BoundField DataField="idPersonal" HeaderText="Codigo">
            </asp:BoundField>
            <asp:BoundField DataField="dsRazSocial" HeaderText="Apellidos y Nombres"></asp:BoundField>
            <asp:BoundField DataField="nuDocIden" HeaderText="Doc.Identidad">
            </asp:BoundField>
            <asp:BoundField DataField="feInicio" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Fe. Desde">
            </asp:BoundField>
            <asp:BoundField DataField="feFin" DataFormatString="{0:dd/MM/yyyy}" HeaderText="fe. Hasta">
            </asp:BoundField>
            <asp:BoundField DataField="dsEstado" HeaderText="Estado">
            </asp:BoundField>
            <asp:BoundField DataField="stEstado" HeaderStyle-CssClass="hideDataGridColumn"
                ItemStyle-CssClass="hideDataGridColumn"></asp:BoundField>
            <asp:BoundField DataField="stAnulado" HeaderStyle-CssClass="hideDataGridColumn"
                ItemStyle-CssClass="hideDataGridColumn"></asp:BoundField>
            </Columns>
            <EmptyDataTemplate>
            <div id="gridempty">
                <asp:Image ID="imgEmpty" runat="server" ImageUrl="../Images/Controls/Attention.png" />
                &nbsp;No existen registros para esta solicitud.
            </div>
            </EmptyDataTemplate>
        </esd:esdGridView>
    </div>
     </ContentTemplate> 
</asp:UpdatePanel>
<ajax:UpdatePanelAnimationExtender ID="upae" BehaviorID="animation" runat="server"
    TargetControlID="updatePanel1">
    <animations>
        <OnUpdating>
        <Parallel duration="0.5">
            <ScriptAction Script="panelOnUpdating();" />  
        </Parallel>
        </OnUpdating>
        <OnUpdated>
        <Parallel duration="0.5">
            <ScriptAction Script="panelOnUpdated();" /> 
        </Parallel> 
        </OnUpdated>
    </animations>
</ajax:UpdatePanelAnimationExtender>
<div id="updateProgressDiv" class="updateProgress" style="display: none">
        <table width="100%">
            <tr>
                <td valign="middle">
                    <img src="../Images/Controls/Loading.gif" />
                </td>
                <td valign="middle">
                    <span class="updateProgressMessage">Cargando ...</span>
                </td>
            </tr>
        </table>
</div>
</asp:Content>